package com.hzgj.bcl.soa.util;

import com.hzgj.bcl.concurrent.FutureListener;

import java.util.concurrent.Future;

public interface NotifyingFuture<T> extends Future<T> {

    /**
     * Attaches a listener and returns the same future instance, to allow for 'building' futures.
     *
     * @param listener listener to attach
     * @return the same future instance
     */
    NotifyingFuture setListener(FutureListener<T> listener);
}
